<script setup lang="ts">
import { fieldConfigs, querySolutionList } from './mockdata';

const conditions = [
    {
        id: 'e605c9f9-a252-48ca-9c65-0bffb3427e86',
        fieldCode: 'id',
        fieldName: '主键啊',
        valueType: 0,
        placeHolder: '',
        beginPlaceHolder: '',
        endPlaceHolder: '',
        visible: true,
        conditionId: 9,
        compareType: '0',
        relation: 1,
        value: { type: 0, content: { value: '123' } },
        control: { type: 0, content: { className: '', require: false } }
    },
    {
        id: '6f1bf2f5-7afc-42c5-81ee-b547db370be9',
        fieldCode: 'AuditStatus',
        fieldName: '稽核状态单选',
        valueType: 0,
        placeHolder: '',
        beginPlaceHolder: '',
        endPlaceHolder: '',
        visible: true,
        conditionId: 6,
        compareType: '0',
        relation: 1,
        lBracket: '(',
        value: { type: 14, content: { value: '2' } },
        control: {
            type: 14,
            content: {
                valueType: '1',
                enumValues: [
                    { type: 1, content: { value: '1', name: '1' } },
                    { type: 1, content: { value: '2', name: '2' } }
                ],
                horizontal: true,
                showLabel: false,
                require: false
            }
        }
    },
    {
        id: '2e6a0b5c-dd36-4bfd-ab3c-e3035f3a8e5a',
        fieldCode: 'EmployeeID.EmployeeID',
        fieldName: '报销人员下拉帮助',
        valueType: 0,
        placeHolder: '',
        beginPlaceHolder: '',
        endPlaceHolder: '',
        visible: true,
        conditionId: 1,
        compareType: '0',
        relation: 1,
        lBracket: '((',
        value: {
            type: 13,
            content: {
                valueField: 'id',
                value: [
                    {
                        id: '9e35953a-40fd-4a9a-922f-b9f59bf2a517',
                        code: 'wangjinzhe',
                        name: 'wangjinzhe',
                        userGroup: '0',
                        sysOrgId: '001',
                        tenantId: 10000,
                        secLevel: 'PUBLIC',
                        userType: 3,
                        note: null
                    },
                    {
                        id: '7e9676e7-5683-4d56-a85e-45d32e2d996c',
                        code: 'wangjinzhe2',
                        name: 'wangjinzhe2',
                        userGroup: '0',
                        sysOrgId: '2d5b79a4-3a86-3fd2-7f71-02c9dc68df6e',
                        tenantId: 10000,
                        secLevel: 'PUBLIC',
                        userType: 3,
                        note: null
                    }
                ],
                textValue: 'wangjinzhe,wangjinzhe2'
            }
        },
        control: {
            type: 13,
            content: {
                uri: 'shaixuanceshialltype.employeeID',
                idField: 'id',
                valueField: 'id',
                textField: 'name',
                mapFields: { code: 'employeeID.employeeID_code', name: 'employeeID.employeeID_name' },
                displayType: 'LOOKUPLIST',
                singleSelect: false,
                enableFullTree: false,
                loadTreeDataType: 'default',
                expandLevel: -1,
                require: false,
                context: { enableExtendLoadMethod: true }
            }
        }
    },
    {
        id: '393c7ac7-64b2-4888-83a9-c1d8b2755339',
        fieldCode: 'DomainID.DomainID',
        fieldName: '所属部门弹出帮助',
        valueType: 0,
        placeHolder: '',
        beginPlaceHolder: '',
        endPlaceHolder: '',
        visible: true,
        conditionId: 2,
        compareType: '0',
        relation: 1,
        rBracket: ')',
        value: {
            type: 2,
            content: {
                value: [
                    {
                        id: '1640d027-7531-2388-e5eb-6fe0ae8c9734',
                        code: 'SCM',
                        name: '供应链产品部',
                        treeinfo: { parentElement: '001', sequence: 2, layer: 2, isDetail: true }
                    },
                    { id: '001', code: '001', name: '浪潮国际', treeinfo: { parentElement: '', sequence: 1, layer: 1, isDetail: false } }
                ],
                valueField: 'id',
                textValue: '供应链产品部,浪潮国际',
                isInputText: false
            }
        },
        control: {
            type: 2,
            content: {
                uri: 'shaixuanceshialltype.domainID',
                textField: 'name',
                valueField: 'id',
                displayType: 'TreeList',
                idField: 'id',
                context: { enableExtendLoadMethod: true },
                enableFullTree: false,
                loadTreeDataType: 'default',
                singleSelect: false,
                expandLevel: -1,
                enableCascade: false,
                cascadeStatus: 'enable',
                require: false,
                nosearch: false,
                editable: false,
                dialogTitle: '',
                pageSize: 20,
                pageList: '10,20,30,50',
                quickSelect: { enable: false, showItemsCount: 10, showMore: true }
            }
        }
    },
    {
        id: 'd9ace6f2-a77a-4b2b-9b3c-61154bb40848',
        fieldCode: 'BillCode',
        fieldName: '单据编号inputgroup',
        valueType: 0,
        placeHolder: '',
        beginPlaceHolder: '',
        endPlaceHolder: '',
        visible: true,
        conditionId: 7,
        compareType: '0',
        relation: 1,
        lBracket: '(',
        value: { type: 15, content: { value: [], textValue: '123', isInputText: true } },
        control: { type: 15, content: { className: '', require: false, editable: true, groupText: '', usageMode: 'text' } }
    },
    {
        id: '3a8403c1-aa75-4091-947e-53f1d2bb8d4d',
        fieldCode: 'TotalSum',
        fieldName: '报帐金额',
        valueType: 0,
        placeHolder: '',
        beginPlaceHolder: '',
        endPlaceHolder: '',
        visible: true,
        conditionId: 8,
        compareType: '0',
        relation: 1,
        rBracket: ')))',
        value: { type: 6, content: { numValue: 5 } },
        control: { type: 6, content: { className: '', placeholder: '', precision: 2, require: false, textAlign: 'left', bigNumber: false } }
    },
    {
        id: 'c7dbe607-bddc-4391-92e2-16f0221765df',
        fieldCode: 'BillType',
        fieldName: '报销类型多选',
        valueType: 0,
        placeHolder: '',
        beginPlaceHolder: '',
        endPlaceHolder: '',
        visible: true,
        conditionId: 3,
        compareType: '0',
        relation: 1,
        lBracket: '(',
        value: { type: 3, content: { value: [{ value: '1', name: '1' }], key: '1' } },
        control: {
            type: 3,
            content: {
                valueType: '1',
                enumValues: [
                    { type: 1, content: { value: '1', name: '1' } },
                    { type: 1, content: { value: '2', name: '2' } },
                    { type: 1, content: { value: '3', name: '3' } }
                ],
                multiSelect: true,
                require: false
            }
        }
    },
    {
        id: 'd152e48d-13d1-4553-94fa-525fa67d4f2b',
        fieldCode: 'BillDate',
        fieldName: '制单日期单日期',
        valueType: 0,
        placeHolder: '',
        beginPlaceHolder: '',
        endPlaceHolder: '',
        visible: true,
        conditionId: 4,
        compareType: '0',
        relation: 1,
        lBracket: '(',
        value: { type: 1, content: { dateValue: '2023-09-01' } },
        control: { type: 1, content: { format: 'yyyy-MM-dd', returnFormat: 'yyyy-MM-dd', require: false, isDynamicDate: false } }
    },
    {
        id: 'abb7ef8e-ef19-4d83-99cc-1b7ff4f05345',
        fieldCode: 'SecID',
        fieldName: '密级ID下拉选择',
        valueType: 0,
        placeHolder: '',
        beginPlaceHolder: '',
        endPlaceHolder: '',
        visible: true,
        conditionId: 5,
        compareType: '0',
        relation: 1,
        rBracket: '))',
        value: {
            type: 3,
            content: {
                value: [
                    { value: 'a', name: 'a' },
                    { value: 'b', name: 'b' },
                    { value: 'c', name: 'c' }
                ],
                key: 'a,b,c'
            }
        },
        control: {
            type: 3,
            content: {
                valueType: '1',
                enumValues: [
                    { type: 1, content: { value: 'a', name: 'a' } },
                    { type: 1, content: { value: 'b', name: 'b' } },
                    { type: 1, content: { value: 'c', name: 'c' } },
                    { type: 1, content: { value: 'd', name: 'd' } },
                    { type: 1, content: { value: 'e', name: 'e' } }
                ],
                multiSelect: true,
                require: false
            }
        }
    }
];
</script>

<template>
    <f-condition-list :fields="fieldConfigs" :conditions="conditions"></f-condition-list>
</template>

<style></style>
